import { Project } from './project';
import { Chapter } from './chapter';
import { Character } from './character';
import { Conversation, Message, PromptTemplate } from './ai-assistant';

/**
 * 项目状态
 */
export interface ProjectState {
  projects: Project[];
  currentProject: Project | null;
  loading: boolean;
  error: string | null;
}

/**
 * 章节状态
 */
export interface ChapterState {
  chapters: Chapter[];
  currentChapter: Chapter | null;
  loading: boolean;
  error: string | null;
}

/**
 * 角色状态
 */
export interface CharacterState {
  characters: Character[];
  currentCharacter: Character | null;
  loading: boolean;
  error: string | null;
}

/**
 * AI助手状态
 */
export interface AIAssistantState {
  conversations: Conversation[];
  currentConversation: Conversation | null;
  promptTemplates: PromptTemplate[];
  loading: boolean;
  sendingMessage: boolean;
  error: string | null;
}

/**
 * UI状态
 */
export interface UIState {
  theme: 'light' | 'dark';
  sidebarOpen: boolean;
  aiAssistantOpen: boolean;
  currentModal: string | null;
  modalData: any | null;
}

/**
 * 应用设置
 */
export interface AppSettings {
  aiModel: string;
  editorFontSize: number;
  editorFontFamily: string;
  saveInterval: number;
  showWordCount: boolean;
  defaultProjectType: string;
}

/**
 * 根状态
 */
export interface RootState {
  project: ProjectState;
  chapter: ChapterState;
  character: CharacterState;
  aiAssistant: AIAssistantState;
  ui: UIState;
  settings: AppSettings;
} 